package com.kerwin.sysmgt.entity;

/*每个操作模块都需要单独建立一个对象*/
/*不能所有操作模块日志 都混在一起*/

import java.io.Serializable;
import java.util.Objects;

/*下回记得先写数据库，数据库的命名和字段居然跟着实体类走了，本末倒置！！！*/
public class SysOperateLogs implements Serializable {
    private static final long serialVersionUID = -8107174154110633670L;
    private String id;
    /*模块名字*/
    private String moduleName;
    /*操作方法*/
    private String operateName;
    /*操作时间*/
    private String operateTime;
    /*操作人*/
    private String user;
    /*操作参数 这个是个难点要把参数封城string 并用,分隔*/
    private String operatingParam;
    /*操作结果*/
    private Boolean operateResult;

    private String errorMessage;

    public SysOperateLogs() {
    }

    public SysOperateLogs(String id, String moduleName, String operateName, String operateTime, String user, String operatingParam, Boolean operateResult, String errorMessage) {
        this.id = id;
        this.moduleName = moduleName;
        this.operateName = operateName;
        this.operateTime = operateTime;
        this.user = user;
        this.operatingParam = operatingParam;
        this.operateResult = operateResult;
        this.errorMessage = errorMessage;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getModuleName() {
        return moduleName;
    }

    public void setModuleName(String moduleName) {
        this.moduleName = moduleName;
    }

    public String getOperateName() {
        return operateName;
    }

    public void setOperateName(String operateName) {
        this.operateName = operateName;
    }

    public String getOperateTime() {
        return operateTime;
    }

    public void setOperateTime(String operateTime) {
        this.operateTime = operateTime;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public String getOperatingParam() {
        return operatingParam;
    }

    public void setOperatingParam(String operatingParam) {
        this.operatingParam = operatingParam;
    }

    public Boolean getOperateResult() {
        return operateResult;
    }

    public void setOperateResult(Boolean operateResult) {
        this.operateResult = operateResult;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }

    @Override
    public String toString() {
        return "SysOperateLogs{" +
                "id='" + id + '\'' +
                ", moduleName='" + moduleName + '\'' +
                ", operateName='" + operateName + '\'' +
                ", operateTime='" + operateTime + '\'' +
                ", user='" + user + '\'' +
                ", operatingParam='" + operatingParam + '\'' +
                ", operateResult=" + operateResult +
                ", errorMessage='" + errorMessage + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SysOperateLogs that = (SysOperateLogs) o;
        return Objects.equals(id, that.id) && Objects.equals(moduleName, that.moduleName) && Objects.equals(operateName, that.operateName) && Objects.equals(operateTime, that.operateTime) && Objects.equals(user, that.user) && Objects.equals(operatingParam, that.operatingParam) && Objects.equals(operateResult, that.operateResult) && Objects.equals(errorMessage, that.errorMessage);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, moduleName, operateName, operateTime, user, operatingParam, operateResult, errorMessage);
    }
}
